import Fluent

struct CreateLanguage: Migration {
    
    func prepare(on database: Database) -> EventLoopFuture<Void> {
        database.schema("languages")
            .id()
            .field("iso", .string)
            .field("isoName", .string)
            .field("nativeName", .string)
            .field("flagIsoCode", .string)
            .create()
    }
    
    func revert(on database: Database) -> EventLoopFuture<Void> {
        database.schema("languages").delete()
    }
}
